#pragma once
#include "stdafx.h"
#include "Flower.h"
#include "Mario.h"
#include "Tortoise.h"
#include "BoomEffective.h"
#include "GameResources.h"
#include "GameMap.h"

class CManage
{
public:
	CManage();
	~CManage();
	void Run();
	void MarioStatusUpdate();
	void FlowerStatusUpdate();
	void TortoiseStatusUpdate();
	bool CheckRecIntersect(IplImage *img_1, CvPoint pos_1, IplImage *img_2, CvPoint pos_2, int MapMoveDis = 0);
	void Spawn();
	void Collider();	
	void BoomEffectUpdate();
private:
	CGameMap m_Map;
	CGameResources m_Resources;
	CMario mario_1;
	vector<CBoomEffective *>_boomefc;
	IplImage *Bg, *CloneBg;
	CFlower flower_1;
	vector<CTortoise *>_tortoise;
	int preSpawnTime;
	bool GameStatus;
};

